package com.sg.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 授权证书信息表，安全记录
 *
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_software_authorization") //6-1-01软件授权证书表
public class OmsSoftwareAuthorization implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 是否主证书 TRUE:是 FALSE:否
     */
    @TableField(value = "is_main_authorization")
    @NotNull(message = "是否主证书不能为空")
    @Schema(description = "是否主证书")
    private String isMainAuthorization;

    /**
     * 授权证书ID
     */
    @TableId(value = "authorization_id", type = IdType.ASSIGN_UUID)
    @NotNull(message = "authorizationId不能为空")
    private String authorizationId;

    /**
     * 是否已启用部署 TRUE:是 FALSE:否
     */
    @TableField(value = "is_deployment_enabled")
    @NotNull(message = "是否已启用部署不能为空")
    @Schema(description = "是否已启用部署")
    private String isDeploymentEnabled;

    /**
     * 授权证书名称
     */
    @TableField(value = "authorization_name")
    @NotNull(message = "授权证书名称不能为空")
    @Schema(description = "授权证书名称")
    private String authorizationName;

    /**
     * 租户空间ID
     */
    @TableField(value = "authorization_space_id")
    @NotNull(message = "租户空间ID不能为空")
    @Schema(description = "租户空间ID")
    private String authorizationSpaceId;

    /**
     * 空间简称
     */
    @TableField(value = "space_short_name")
    @Schema(description = "空间简称")
    private String spaceShortName;

    /**
     * 域名地址
     */
    @TableField(value = "dns_addresses")
    @Schema(description = "域名地址")
    private String dnsAddresses;

    /**
     * IP地址
     */
    @TableField(value = "ip_addresses")
    @Schema(description = "IP地址")
    private String ipAddresses;

    /**
     * 服务器机器码
     */
    @TableField(value = "server_mac_code")
    @Schema(description = "服务器机器码")
    private String serverMacCode;

    /**
     * 开通钥匙ID
     */
    @TableField(value = "sch_open_record_id")
    @NotNull(message = "开通钥匙ID不能为空")
    @Schema(description = "开通钥匙ID")
    private String schOpenRecordId;

    /**
     * 开通钥匙标识
     */
    @TableField(value = "sch_open_record_code")
    @NotNull(message = "开通钥匙标识不能为空")
    @Schema(description = "开通钥匙标识")
    private String schOpenRecordCode;

    /**
     * 开通钥匙类型标识
     */
    @TableField(value = "authorization_key_type_code")
    @NotNull(message = "开通钥匙类型标识不能为空")
    @Schema(description = "开通钥匙类型标识")
    private String authorizationKeyTypeCode;

    /**
     * 开通对象ID
     */
    @TableField(value = "authorization_object_id")
    @NotNull(message = "开通对象ID不能为空")
    @Schema(description = "开通对象ID")
    private String authorizationObjectId;

    /**
     * 开通对象类型编码 TENANT_SPACE:租户空间 ORG:组织 EVA_THEME:评价主题 EVA_TEMP:评价模板 PLATFORM:平台
     */
    @TableField(value = "appl_obj_type")
    @Schema(description = "开通对象类型编码")
    private String applObjType;

    /**
     * 配置方案ID
     */
    @TableField(value = "authorization_scheme_id")
    @NotNull(message = "配置方案ID不能为空")
    @Schema(description = "配置方案ID")
    private String authorizationSchemeId;

    /**
     * 冗余开通对象名称
     */
    @TableField(value = "applex_name")
    @Schema(description = "冗余开通对象名称")
    private String applexName;

    /**
     * 授权类型 CYCLE_TIME:周期时间型 FIXED_TIME:固定时间型 QUANTITY:数量型
     */
    @TableField(value = "scheme_authorization_type")
    @NotNull(message = "授权类型不能为空")
    @Schema(description = "授权类型")
    private String schemeAuthorizationType;

    /**
     * 授权数量
     */
    @TableField(value = "authorization_num")
    @Schema(description = "授权数量")
    private String authorizationNum;

    /**
     * 授权开始时间
     */
    @TableField(value = "authorization_start_time")
    @Schema(description = "授权开始时间")
    private Date authorizationStartTime;

    /**
     * 授权截止时间
     */
    @TableField(value = "authorization_end_time")
    @Schema(description = "授权截止时间")
    private Date authorizationEndTime;

    /**
     * 授权单位
     */
    @TableField(value = "authorization_unit")
    @Schema(description = "授权单位")
    private String authorizationUnit;

    /**
     * 部署类型编码 SAAS:SAAS部署 LOCALITY:本地化部署
     */
    @TableField(value = "deploy_type_code")
    @Schema(description = "部署类型编码")
    private String deployTypeCode;

    /**
     * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
     */
    @TableField(value = "subject_life_cycle")
    @NotNull(message = "主体生命周期不能为空")
    @Schema(description = "主体生命周期")
    private String subjectLifeCycle;

    /**
     * 是否存档 TRUE:是 FALSE:否
     */
    @TableField(value = "is_archive")
    @NotNull(message = "是否存档不能为空")
    @Schema(description = "是否存档")
    private String isArchive;

    /**
     * 操作人就职记录ID
     */
    @TableField(value = "operation_induction_id")
    @NotNull(message = "操作人就职记录ID不能为空")
    @Schema(description = "操作人就职记录ID")
    private String operationInductionId;

    /**
     * 创建人就职记录ID
     */
    @TableField(value = "create_induction_id")
    @NotNull(message = "创建人就职记录ID不能为空")
    @Schema(description = "创建人就职记录ID")
    private String createInductionId;

    /**
     * 发布人就职记录ID
     */
    @TableField(value = "release_induction_id")
    @Schema(description = "发布人就职记录ID")
    private String releaseInductionId;

    /**
     * 存档人就职记录ID
     */
    @TableField(value = "archive_induction_id")
    @Schema(description = "存档人就职记录ID")
    private String archiveInductionId;

    /**
     * 操作时间
     */
    @TableField(value = "operate_time")
    @NotNull(message = "操作时间不能为空")
    @Schema(description = "操作时间")
    private Date operateTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 发布时间
     */
    @TableField(value = "release_time")
    @Schema(description = "发布时间")
    private Date releaseTime;

    /**
     * 存档时间
     */
    @TableField(value = "archive_time")
    @Schema(description = "存档时间")
    private Date archiveTime;

    /**
     * 是否作废 TRUE:是 FALSE:否
     */
    @TableField(value = "is_valid")
    @NotNull(message = "是否作废不能为空")
    @Schema(description = "是否作废")
    private String isValid;

    /**
     * 创建于空间ID
     */
    @TableField(value = "space_id")
    @NotNull(message = "创建于空间ID不能为空")
    @Schema(description = "创建于空间ID")
    private String spaceId;

    /**
     * 创建于联盟应用ID
     */
    @TableField(value = "app_id")
    @NotNull(message = "创建于联盟应用ID不能为空")
    @Schema(description = "创建于联盟应用ID")
    private String appId;
}
